package boot.spring.listener;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;

/**
 * 流程监听器
 * @author Administrator
 *
 *ExecutionListener有三个事件：start、take、end。
 *start是流程开始节点的事件一般用在开始节点；
 *end是流程结束时触发的事件,
 *take是流程图中流转线条的事件。
 *
 *
 *
 */
public class MyExecutionListener implements ExecutionListener{

	@Override
	public void notify(DelegateExecution execution) throws Exception {
		// TODO Auto-generated method stub
		
		System.out.println("--MyExecutionListener-getProcessBusinessKey---->"+execution.getProcessBusinessKey());
		System.out.println("--MyExecutionListener-getBusinessKey---->"+execution.getBusinessKey());
		System.out.println("--MyExecutionListener-getEventName---->"+execution.getEventName());
		System.out.println("--MyExecutionListener-getProcessDefinitionId---->"+execution.getProcessDefinitionId());
		
		System.out.println("--MyExecutionListener-getProcessInstanceId---->"+execution.getProcessInstanceId());
		System.out.println("--MyExecutionListener-getId---->"+execution.getId());
	}

}
